<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>建筑ERP管理系统</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="./resources/layui/css/layui.css">
    <link rel="stylesheet" type="text/css" href="./resources/css/global.css">
    <style>
        /*.mask{*/
        /**/
        /*width: 100%;*/
        /*background: #3F3F3F;*/
        /*}*/
        .mask{width: 100%;position: fixed;left: 0;right: 0;top: 0;bottom: 0;z-index:10;background-color: rgba(0,0,0,.3);display:
                none;}
        .layui-body iframe {
            width: 102%;
            height: 94.5%;
        }
        .icon-show{
            width: 40px;
            height: 40px;
        }

        .selecteds {
            color: #01AAED!important;
        }

        .layui-tab {
            height: 100%;
        }

        .layui-tab-content,
        .layui-tab-item {
            height: 98%;
        }

        .leftNav {
            background-image: url("./resources/images/leftnav.png");
            background-repeat: no-repeat;
            width: 20px;
            height: 20px;
            display: inline-block;
        }

        iframe html {
            height: 100%;
        }

        iframe body {
            height: 100%;
        }

        .noshow i {
            display: none !important;
        }

        .layui-layout-admin .layui-body {
            bottom: 10px;
            overflow: hidden;
        }

        .layui-layout-admin .layui-side {
            width: 203px;
        }

        .logo {
            font-size: 30px;
            color: #FFF;
            font-weight: bolder;
            position: absolute;
            top: 9px;
            left: 0px!important;
        }

        .layui-tab-content {
            padding: 0;
        !important;
        }
        /*系统样式  可能需要禁止*/

        .ceshi .layui-nav-item a:hover {
            background-color: #009688;
        }

        body .layui-layout-admin .footer-demo {
            line-height: 55px;
            height: 44px;
        }

        @media screen and (max-width: 750px) {
            .layui-body {
                height: 100%;
            }
            .site-tree-mobile {
                display: block!important;
            }
            .layui-tab-content,
            .layui-tab-item {
                height: 100%;
            }
            .layui-body iframe {
                width: 101%;
                height: 100%;
            }
        }

        .gundongtiao {
            overflow: hidden!important;
        }

        @media only screen and (min-device-width: 768px) and (max-device-width: 1024px) {

            .gundongtiao {
                overflow: auto!important;
            }
        }

        .layui-edge,
        .layui-header,
        .layui-inline,
        .layui-main {
            position: fixed;
            left: 0;
            right: 0;
        }
        .layui-tab-title .layui-this{color: #fff;background-color: #009688;}
        .GRXX{position: absolute;right: 140px;top: 0px;}
        .GRXX img{
            width: 50px;height: 50px; border-radius: 50%;
        }
        .dengNames{font-size: 16px; color: #FFF;margin-left: 10px;}
        .tx-content .layui-tab-item iframe{height: 100%;}

        .layui-nav-item{
            z-index: 99999;
        }
    </style>
</head>

<body>
<div class="mask"></div>
<div class="main-box">
    <!-- 头部 -->
    <div class="tx-header">
        <div class="section-senter">
            <h1 class="tx-logo">建筑ERP管理系统
            </h1>
            <ul class="layui-nav _PCNAV">
                <li class="layui-nav-item">
                    <div id="tp-weather-widget"></div>
                </li>
                <li class="layui-nav-item" lay-unselect="">
                    <a href="javascript:;"><img src="./resources/images/logos_pic.png" class="layui-nav-img"><i class="dengNames"></i></a>
                    <dl class="layui-nav-child">
                        <dd><a href="javascript:;" id="upwd">修改密码</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a href="###" onclick="tuichu()">退出</a>
                </li>
            </ul>
            <div class="site-tree-mobile layui-hide">
                <i class="layui-icon">&#xe649;</i>
            </div>
        </div>
    </div>
    <div class="sm-header">
        <div class="section-senter">
            <div class="site-tree-mobile layui-hide icon-show">
                <i class="layui-icon dh">&#xe649;</i>
            </div>
        </div>
    </div>
    <!-- 左侧栏 -->
    <div class="tx-left-slide">
        <div class="layui-side layui-bg-black">
            <div class="layui-side-scroll">
                <ul class="layui-nav layui-nav-tree ceshi" lay-filter="test">
                    <li id="001" class="layui-nav-item zuodao">
                        <a class="" href="javascript:;"><span class="leftNav" style="background-position-y: -233px;"></span>工程部管理系统</a>
                        <dl class="layui-nav-child">
                            <dd><a data_href="./modular/engineeringDepartment/contractQuery/contractQuery.html" target="text">工程合同查询</a></dd>
                            <dd><a data_href="./modular/management/cailiaoshenqingshenpi/cailiaoshenqingshenpi.html" target="text">材料申请审批</a></dd>
                            <dd><a data_href="./modular/engineeringDepartment/cailiaogonghuoqueding/cailiaogonghuoqueding.html" target="text">材料供货单供货确认审核</a></dd>
                            <dd><a data_href="./modular/management/cailiaogongyingshangchaxuntongji/cailiaogongyingshangchaxuntongji.html" target="text">材料供货商查询统计</a></dd>
                            <dd><a data_href="./modular/engineeringDepartment/ENgongchengyongliaotongji/ENgongchengyongliaotongji.html" target="text">工程用料统计</a></dd>
                            <dd><a data_href="./modular/management/gongchengqianzhengdanSP/gongchengqianzhengdanSP.html" target="text">工程签证单审批</a></dd>
                            <!--<dd><a data_href="./modular/ceshi3.html" target="text">工程签证单查询</a></dd>-->
                            <dd><a data_href="./modular/engineeringDepartment/gongchengjinduchaxun/gongchengjinduchaxun.html" target="text">工程进度查询并确认</a></dd>
                            <dd><a data_href="./modular/management/materialReturnGoods/returnGoodsList.html" target="text">工程材料退回</a></dd>
                        </dl>
                    </li>
                    <li id="002" class="layui-nav-item zuodao">
                        <a class="" href="javascript:;"><span class="leftNav" style="background-position-y: -3px;"></span>系统维护管理</a>
                        <dl class="layui-nav-child">
                            <!--<dd><a data_href="http://www.baidu.com" target="text">材料调转管理</a></dd>-->
                            <!--<dd><a data_href="./modular/ceshi2.html" target="text">数据修改管理</a></dd>-->
                            <dd><a data_href="./modular/systemMaintain/logQuery/logQuery.html" target="text">系统日志查询</a></dd>
                            <dd><a data_href="./modular/systemMaintain/accountAdmin/accountAdmin.html" target="text">系统账户管理</a></dd>
                            <dd><a data_href="./modular/systemMaintain/enterpriseInfor/enterpriseInfor.html" target="text">企业信息管理</a></dd>
                            <dd><a data_href="./modular/systemMaintain/constructionManage/constructionManage.html" target="text">施工单位信息管理</a></dd>
                            <dd><a data_href="./modular/systemMaintain/materialManage/materialManage.html" target="text">材料供应商信息管理</a></dd>
                            <dd><a data_href="./modular/systemMaintain/cailiaodiaozhuan/cailiaodiaozhuan.html" target="text">材料调转</a></dd>
                        </dl>
                    </li>
                    <li id="003" class="layui-nav-item layui-nav-itemed zuodao">
                        <a class="" href="javascript:;"><span class="leftNav" style="background-position-y: -48px;"></span>经营部系统</a>
                        <dl class="layui-nav-child">
                            <dd><a data_href="./modular/management/contracrAdmin/contractAdmin.html" target="text">工程合同管理</a></dd>
                            <dd><a data_href="./modular/management/shenpi/shenpi.html" target="text">工程合同审批</a></dd>
                            <dd><a data_href="./modular/management/gongchengjindukuan/gongchengjindukuan.html" target="text">工程进度款管理</a></dd>

                            <dd><a data_href="./modular/engineeringDepartment/gongchengjuesuan/gongchengjuesuan.html" target="text">工程决算管理</a></dd>
                            <dd><a data_href="./modular/management/cailiaogongyingshangchaxuntongji1/cailiaogongyingshangchaxuntongji.html" target="text">材料供货商查询统计</a></dd>
                            <dd><a data_href="./modular/management/gongchengqianzhengdanSP1/gongchengqianzhengdanSP.html" target="text">工程签证单审批</a></dd>      <!--区别工程部  进行权限控制-->
                            <!--<dd><a data_href="./modular/management/gongchengyongliaotongji/gongchengyongliaotongji.html" target="text">工程用料统计</a></dd>-->
                            <!--<dd><a data_href="./modular/management/managecaihedui/managecaihedui.html" target="text">材料供货商供货单核对</a></dd>-->
                            <dd><a data_href="./modular/materialQuery/cailiaogongyingchaxun/cailiaogongyingchaxun.html" target="text">材料供货商供货单核对</a></dd>       <!--和材料供应商 查询统计同一个页面-->
                            <dd><a data_href="./modular/management/materialInformAdmin/materialInformAdmin.html" target="text">材料信息管理</a></dd>
                        </dl>
                    </li>
                    <li id="004" class="layui-nav-item zuodao">
                        <a class="" href="javascript:;"><span class="leftNav" style="background-position-y: -94px;"></span>施工单位系统</a>
                        <dl class="layui-nav-child">
                            <dd><a data_href="./modular/engineeringDepartment/hetongjindu/hetongjindu.html" target="text">工程合同进度查询</a></dd>
                            <dd><a data_href="./modular/construction/xuqiushenqing/xuqiushenqing.html" target="text">工程材料需求申请单管理</a></dd>
                            <!--<dd><a data_href="./modular/ceshi3.html" target="text">工程转料申请</a></dd>-->
                            <dd><a data_href="./modular/construction/progress/progress.html" target="text">工程进度上报</a></dd>
                            <dd><a data_href="./modular/construction/visaAdmin/visaAdmin.html" target="text">工程签证管理</a></dd>
                            <!--<dd><a data_href="./modular/engineeringDepartment/contractQuery1/contractQuery.html" target="text">工程合同查询</a></dd>-->
                            <dd><a data_href="./modular/construction/material/material.html" target="text">材料签收</a></dd>
                            <dd><a data_href="./modular/engineeringDepartment/materialReturnGoods/returnGoodsList.html" target="text">工程材料退回</a></dd>
                            <dd><a data_href="./modular/engineeringDepartment/ENgongchengyongliaotongji1/ENgongchengyongliaotongji.html" target="text">工程用料统计</a></dd>

                        </dl>
                    </li>
                    <li id="005" class="layui-nav-item zuodao">
                        <a class="" href="javascript:;"><span class="leftNav" style="background-position-y: -139px;"></span>材料供应商系统</a>
                        <dl class="layui-nav-child">
                            <dd><a data_href="./modular/materialQuery/cailiaoApply/cailiaoApply.html" target="text">工程材料需求申请单管理</a></dd>
                            <dd><a data_href="./modular/materialQuery/signAdmin/signAdmin.html" target="text">材料供应单签收管理</a></dd>
                            <dd><a data_href="./modular/materialQuery/cailiaogongyingchaxun1/cailiaogongyingchaxun.html" target="text">材料供应查询统计</a></dd>
                            <dd><a data_href="./modular/materialQuery/materialReturnGoods/returnGoodsList.html" target="text">工程材料退回</a></dd>
                            <!--<dd><a data_href="./modular/materialQuery/settlement/settlement.html" target="text">(假)查询材料费用结算单</a></dd>-->
                        </dl>
                    </li>
                    <li id="006" class="layui-nav-item zuodao">
                        <a class="" href="javascript:;"><span class="leftNav" style="background-position-y: -139px;"></span>权限管理</a>
                        <dl class="layui-nav-child">
                            <dd><a data_href="./resources/admin_back/quanxianguanli.html" target="text">权限管理</a></dd>
                        </dl>
                    </li>
                    <li id="007" class="layui-nav-item zuodao">
                        <a class="" href="javascript:;"><span class="leftNav" style="background-position-y: -139px;"></span>领导查询系统</a>
                        <dl class="layui-nav-child">
                            <dd><a data_href="./modular/boos1.html" target="text">工程量统计信息管理</a></dd>
                        </dl>
                    </li>
                    <!--<li class="layui-nav-item">-->
                    <!--<a class="" href="javascript:;"><span class="leftNav" style="background-position-y: -182px;"></span>领导查询系统</a>-->
                    <!--<dl class="layui-nav-child">-->
                    <!--<dd><a data_href="http://www.baidu.com" target="text">工程合同查询</a></dd>-->
                    <!--<dd><a data_href="./modular/ceshi2.html" target="text">工程材料使用查询</a></dd>-->
                    <!--<dd><a data_href="./modular/ceshi3.html" target="text">材料费用结算查询</a></dd>-->
                    <!--</dl>-->
                    <!--</li>-->
                </ul>
            </div>
        </div>
    </div>
    <!-- 内容区 -->
    <div class="tx-content">
        <div class="layui-tab" lay-filter="demo" lay-allowclose="true">
            <ul class="layui-tab-title">
                <li class="layui-this noshow" lay-id="shouye">首页</li>
            </ul>
            <div class="layui-tab-content">
                <div class="layui-tab-item layui-show" style="-webkit-overflow-scrolling:touch;">
                    <iframe src="./modular/shouye.html" name="text" frameborder="0" target="_self"></iframe>
                </div>
            </div>
        </div>
    </div>

    <div class="tx-footer">
        <p>
            <span>砼鑫工程建筑ERP管理系统</span>
            <span>豫ICP备18010953号</span>
        </p>
    </div>
</div>




<script>(function(T,h,i,n,k,P,a,g,e){g=function(){P=h.createElement(i);a=h.getElementsByTagName(i)[0];P.src=k;P.charset="utf-8";P.async=1;a.parentNode.insertBefore(P,a)};T["ThinkPageWeatherWidgetObject"]=n;T[n]||(T[n]=function(){(T[n].q=T[n].q||[]).push(arguments)});T[n].l=+new Date();if(T.attachEvent){T.attachEvent("onload",g)}else{T.addEventListener("load",g,false)}}(window,document,"script","tpwidget","//widget.seniverse.com/widget/chameleon.js"))</script>
<script>tpwidget("init", {
    "flavor": "slim",
    "location": "WX4FBXXFKE4F",
    "geolocation": "enabled",
    "language": "auto",
    "unit": "c",
    "theme": "white",
    "container": "tp-weather-widget",
    "bubble": "enabled",
    "alarmType": "badge",
    "color": "#FFFFFF",
    "uid": "U0D4500362",
    "hash": "a32eea43ce3b3066ea69eff593ac0d2b"
});
tpwidget("show");</script>
</body>
<script src="./resources/js/jquery.min.js"></script>
<script src="./resources/layui/layui.js" charset="utf-8"></script>
<script src="./resources/js/style.js"></script>
<script src="./resources/js/api.js"></script>


<script>

//    function setIframeHeight(iframe) {
//        iframe.height = $('.tx-content').height() - 30;
//    };
    function tuichu() {             //点击退出是执行下列js清除Cookie并跳转页面
        delCookie('yanzheng');      //清除Cookie上指定的数据
        window.location.href='./index.html';        //跳转至登录页
        localStorage.ZQXdata='';       //清空长期缓存
        localStorage.jiekou='';
    }

    var manAndBoy = {}

    window.global = {
        pageType: 'demo'
        ,preview: function(){
            var preview = document.getElementById('LAY_preview');
            return preview ? preview.innerHTML : '';
        }()
    };
    layui.config({
        base: './resources/layui/lay/modules/'          //设定扩展的Layui模块的所在目录，一般用于外部模块扩展
        ,version: false                         //一般用于更新模块缓存，默认不开启。设为true即让浏览器不缓存。也可以设为一个固定的值，如：201610
    }).use('global');
    layui.use(['element','table','form'], function(){
        var element = layui.element;
        var $=layui.$;
        var form=layui.form;
        var layer = layui.layer;


        if ( getCookie("alert") != "false" ){
            //示范一个公告层
            layer.open({
                type: 1
                ,title: "操作需知" //不显示标题栏
                ,closeBtn: false
                ,area: '300px;'
                ,shade: 0.8
                ,id: 'LAY_layuipro' //设定一个id，防止重复弹出
                ,btn: ['不再提示', '我知道了']
                ,btnAlign: 'c'
                ,moveType: 1 //拖拽模式，0或者1
                ,content: '<div style="padding: 50px; line-height: 22px; background-color: #393D49; color: #fff; font-weight: 300;">一、修改密码可以在右上方指向头像出现修改密码菜单进行密码修改！<br><br>二、Android版本 登录后不能在其他手机登录，需要在登录那个手机上退出登陆后才可以更换新设备登录(电脑端无此限制)！</div>'
                ,success: function(layero){
                    var btn = layero.find('.layui-layer-btn');
                    btn.find('.layui-layer-btn0').click(function () {
                        setCookie("alert","false");
                    });
                }
            });
        }




        $('.zuodao').each(function () {         //控制左侧列表的展开与关闭    循环所有类名为zuodao的页面元素
                                                //类名为zuodao的页面元素失去类名'layui-nav-itemed'后会关闭,否则会打开
            $(this).on('click',function () {     //点击的时候删除所有的zuodao上的类名'layui-nav-itemed'；
                $('.zuodao').removeClass('layui-nav-itemed');
                $(this).addClass('layui-nav-itemed');       //给当前this添加新类名'layui-nav-itemed'；
            });
        });

        var names=getCookie('yanzheng');        //变量赋值，读取Cookie内的“yanzheng”
        if(!names){                             //如果读入不到为空，直接进行页面跳转
            location.href='./index.html';
        };
        names=names.split('|');                 //字符串转数组
        if(names[0] != '100'){                    //如果登录名不为100，QX功能删除
            console.log(".........");
            $('#006').remove();
        };
        $('.dengNames').text(names[0]);         //渲染页面登录名


        //监听点击修改密码
        $("#upwd").click(function () {
            element.tabDelete('demo', 'editpassword');
            element.tabAdd('demo', {
                title: '修改密码'
                ,content: '<iframe src="./password.html" name="text" frameborder="0" target="_self"></iframe>'
                ,id: 'editpassword'
            });
            element.tabChange('demo', 'editpassword');
        });



        //监听tab切换   对应左侧菜单
        element.on('tab(demo)', function(data){
            console.log(data)
            var as=data.elem.context.innerText;     //获取到点击时要取到的文本内容
            as=as.substring(0,as.length-1);        //获取时会多一个字符串,需要清除掉
            as=$.trim(as);                          //字符串去空
            var _id='';                     //取对应id值;
            var duan=false;                 //增加一个判断条件    判断是否需要改类名
            $('.layui-side-scroll li').each(function (){                //循环所有的li进行判断
                $(this).children('dl').children('dd').each(function () {        //循环所有的dd进行判断
                    $(this).removeClass('layui-this');                          //删除dd所有类名
                    $('.layui-side-scroll li').removeClass('layui-nav-itemed');         //删除所有li 对应的类名
                    var _text=$(this).children('a').text();                     //获取要对比的文本内容
                    _text=$.trim('_text');                                      //去空格
                    if($(this).children('a').html()==as){                       //判断点击的值是否等于左侧导航栏的值
                        $(this).addClass('layui-this');                         //增加类名
                        _id=$(this).parent().parent('li').attr('id');           //获取需要判断的页面id
                        duan=true;                                              //判断重置
                    };
                });
                if(duan){
                    document.getElementById(_id).classList.add("layui-nav-itemed");         //找到id赋予类名
                };
            });

        });

        //权限左侧导航栏一  , 二级菜单显隐控制
        function quanxianLD(data) {
            var arr=data;
            $('.ceshi').find('.zuodao').each(function (k ,v) {      //循环类ceshi下所有的zuodao

                $(v).find('dl').find('a').each(function (k1, va1) { //当前zuodao下的所有dl下的a标签循环
                    var dhSb = $(this).attr('data_href');           //获取当前a标签的自定义属性；
                    var tempStr = dhSb.substr(1,dhSb.length);       //变量tempStr赋值
                    var str = arr.toString();

                    if(tempStr=='/resources/admin_back/quanxianguanli.html'){       //将权限列表排除在外（本身即为权限不受限权限中）
                        return;
                    }
                    if(arr.indexOf(tempStr) == -1){                 //如果当前的判断返回-1 找到当前a的父级并删除；
                        $(va1).parent().remove();
                    }
                })
            })

            $.each($('.ceshi li'),function (k1,v1) {                //循环所有的ceshi下的li标签
                if($(v1).children('dl').children('dd').length==0){  //如果li的子集下的dd的长度为0，那么就删除这个li
                    $(v1).remove();
                }
            })

        }
        try{                                                        //若是下列条件有问题，执行catch函数内部的代码；（目前暂无代码，若出错及说明当前获取权限状态出错，可放开catch()代码内的跳转。）
            var arrs=localStorage.ZQXdata;
            arrs=arrs.split(',');
            quanxianLD(arrs);                   //调用左侧权限函数
        } catch (e){
//            location.href='./index.html';
        }


//          监听左侧导航栏切换

        var tels=[];                        //声明一个新数组用以记录左侧导航栏的操作
        element.on('nav(test)',function (elem) {       //左侧导航栏监听
            $(".mask").hide();
            //确定监听对象  获取需要传递给iframe的地址
            var target = elem.children('a');
            //获取每个对象的data_href属性
            var urlss = target.attr('data_href');
            // now
            // 首先第一次惦记的时候应该是打开这个tab,然后给他定义一个表示
            // 先默认添加一个然后 添加一个表示,表示能不能添加
            var canDeepMan = true;
            var leiui = 0; // 累哟哎
            $('iframe').each(function (k, v) {              //所有的iframe循环
                if(urlss == $(this).attr('src')){           //如果当前的iframe的自定义属性src等于变量urlss
                    $(v).parent().addClass('layui-show').siblings().removeClass('layui-show');      //当前iframe的父级显示，其他的iframe删除类名“layui-show”，    失去"layui-show"会使dom元素隐藏
                    $('.layui-tab-title').find('li').removeClass('layui-this');         //左侧导航栏内的li删除类名“layui-this”    即选中效果；
                    $('.layui-tab-title').find('li').eq(k).addClass('layui-this');
                    this.contentWindow.location.reload(true);
                    canDeepMan = false;
                };
            });
            if(!canDeepMan){        //如果结果为false  终止执行
                return;
            };
            var active = {
                tabAdd: function () {
                    //新增一个Tab项
                    element.tabAdd('demo', {
                        title: target.html()
                        , content: '<iframe src=' + urlss + ' name="text" frameborder="0" target="_self"></iframe>'
                        , id: elem.index()
                    })
                }
                , tabDelete: function (othis) {
                    //删除指定Tab项
//                        element.tabDelete('demo', '44'); //删除：“商品管理”
//                        othis.addClass('layui-btn-disabled');
                }
                , tabChange: function (obj) {
//                        //切换到指定Tab项
//                        element.tabChange('demo', '22'); //切换到：用户管理
                }
            };
            //调用添加
            active.tabAdd('demo');
            tels.push(urlss);
            $('body').removeClass();
            //------------------------------>控制选项卡的切换效果  --开始
            $('.layui-tab-item').removeClass('layui-show');     //删除类名
            var _index = $('.layui-tab-item').length - 1;       //获取数值，用以判断应该对哪个元素进行更改
            ////console.log(_index)
            $('.layui-tab-item').eq(_index).addClass('layui-show');     //第_index个元素赋值类名
            var _index = $('.layui-tab-title li').length - 1;           //获取数值，用以判断应该对哪个元素进行更改
            $('.layui-tab-title li').removeClass('layui-this');         //所有li删除类名‘layui-this’
            $('.layui-tab-title li').eq(_index).addClass('layui-this'); //第_index个元素赋值类名
            //<------------------------------控制选项卡的切换效果  --结束
        });
        $('[lay-id=shouye]').children('i').remove();        //删除首页的

        //下列代码已废弃，暂时勿删
        var flag=false;
//      var flag2=true;
        $(".dh").click(function () {
        	$(".mask").show();
            $("._MOVE").show();
            if(flag==false){
                flag=true;
            }else{
                flag=false;
            }
        });
        $(".mask").click(function () {
            $(".mask").hide();
            $("._MOVE").hide();
            if(flag==true){
                flag=false;
            }else if(flag==false){
                flag=true;
            }
        })

    });


</script>



</html>